package org.geektimes.injection.stream;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @FileName: ResponseHandlerConsumer
 * @Description: 应答处理函数式接口
 * @Author: MaWenHao
 * @Created: 2021/3/1 - 上午12:38
 */
@FunctionalInterface
public interface ResponseHandlerConsumer<T> {

    /**
     * 根据不同的处理规则给前台返回不同的应答
     * @param t 处理器得到的结果
     * @param request
     * @param response
     */
    void accept(T t, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
